Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add client for erdbeere #748

Open
wants to merge 9 commits into
base: dev
Choose a base branch
from
Open

Conversation

fosterfarrell9
Copy link
Collaborator

@fosterfarrell9 fosterfarrell9 commented Feb 4, 2025

We add a client for the erdbeere API. The main point is to establish communication in development between a local installation of erdbeere and a local installation of mampf. In order to be able to do that, some headers have to be modified, so we wrote a small wrapper for that (in production it does basically nothing, i.e. the header is not modified).


Respective PR on the erdbeere side: MaMpf-HD/erdbeere#4

Warning

Merge the Erdbeere PR first, then this PR.

Splines and others added 4 commits January 3, 2025 22:27
* Init coffee TODO list (for conversion)

* Show number of lines in coffee TODO list

* Sort list according to number of lines in coffee files

* Remove import_manuscript.coffee

* Replace deprecated location.reload(true) with cache busting

* Delete error.coffee

* Replace subscription swatch coffee by JS

* Replace location.reload() in identify.coffee

* Decaffeinate update for answers (in lecture edit mode)

* Decaffeinate delete_edge

* Delete new.coffee

* Decaffeinate default target update in quiz

* Decaffeinate cancel edit tags (erdbeere)

* Decaffeinate display_info (for erdbeere)

* Decaffeinate edit tags

* Decaffeinate delete_account modal rendering

* Decaffeinate cancel_edit tutorials

* Add watch out for section

* Decaffeinate validate certificate (tutorials)

* Decaffeinate cancel edit assignment

* Decaffeinate cancel_import_media (Reset button)

* Decaffeinate cancel_action as tutor (e.g. move to another tut)

* Decaffeinate cancel_edit_correction (as tutor)

* Decaffeinate validate quiz certificates (as tutor)

* Decaffeinate new vertex (in quiz)

* Delete render_sidebar

* Decaffeinate late submission accept

* Decaffeinate reject submission (as tutor)

* Decaffeinate refresh_token (for submissions as tutor)

* Add 😭 emoji
@Splines
Copy link
Member

Splines commented Feb 4, 2025

@fosterfarrell9 Could you merge the dev branch first into this one? It seems there is some divergence, e.g. the coffee file etc. You might have not yet pulled the new dev branch.

Copy link
Member

@Splines Splines left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice, this works like a charm, thanks! Here some further comments. I've also reviewed the respective erdbeere PR. The erdbeere PR must be merged before this one.

Comment on lines +3 to +5
ERDBEERE_CONNECTION = Faraday.new(url: ERDBEERE_API_URL) do |conn|
conn.adapter(Faraday.default_adapter)
end
Copy link
Member

@Splines Splines Feb 16, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠ In production, how does MaMpf communicate with the Erdbeere server? Is Erdbeere just available on localhost or also available to the word-wide web. In the latter case, how does MaMpf authenticate at Erdbeere? I'm wondering in particular since Erdbeere itself has a frontend which allows to log in.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants